package com.chencs.app.lianmeng.controller;

import com.alibaba.fastjson.JSON;
import com.chencs.app.lianmeng.service.LMOrderSer;
import com.chencs.vo.net.lmrequest.LmOrderRequest;
import com.chencs.vo.net.lmrequest.LmRegisterRequest;
import com.chencs.vo.net.lmresponse.LmRegisterResponse;
import com.chencs.vo.net.response.ResponseBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单相关
 */
@RestController
@RequestMapping("/app/lmOrder")
public class LMOrderCtr {


    @Autowired
    private LMOrderSer lmOrderSer;

    /**
     * 同步订单
     * @param request
     * @return
     */
    @RequestMapping(value = "/syncOrder", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
    public  String syncOrder(@RequestBody LmOrderRequest request){
        ResponseBase response = lmOrderSer.imporeOrder();
        return JSON.toJSONString(response);
    }





}
